import { request, requestFy } from '@/utils/request';

// 获取运输计划列表
export function getDataLists(data) {
  return request({
    url: '/queue/load-site-mgr/get-page-applet',
    method: 'GET',
    data: data
  });
}
//获得地区树
export function getAreaTrees(id) {
  return requestFy({
    url: `/region-cn/find-id/${id}`,
    headers: {
      isToken: false
    },
    method: 'GET'
  });
}
//获得地区树
export function getAreaTreesBycode(id) {
  return request({
    url: `/system/area/getAreaByCode?fatherCode=${id}`,
    headers: {
      isToken: false
    },
    method: 'GET'
  });
}

// 创建
export function createOne(data) {
  return request({
    url: '/queue/load-site-mgr/create-applet',
    method: 'POST',
    data: data
  });
}

// 获取一条详情
export function getOne(id) {
  return request({
    url: `/queue/load-site-mgr/get-applet?id=${id}`,
    method: 'GET'
  });
}
// 更新
export function updateOne(data) {
  return request({
    url: '/queue/load-site-mgr/update-applet',
    method: 'PUT',
    data: data
  });
}
